﻿CREATE TABLE [dbo].[temp_DataGrid] (
    [LoanID]                   INT             NOT NULL,
    [ContractHolder]           NVARCHAR (64)   NULL,
    [ContractHolderID]         INT             NOT NULL,
    [DownPayment]              NUMERIC (9, 2)  NULL,
    [DownPayment_Min]          TINYINT         NOT NULL,
    [DownPaymentRatio]         NUMERIC (18, 1) NULL,
    [DownPaymentOK]            NUMERIC (19, 1) NULL,
    [Lamp_DP]                  VARCHAR (128)   NULL,
    [AmountFinanced]           NUMERIC (18, 2) NULL,
    [AF_Adjusted]              REAL            NULL,
    [AFRatio_Max]              TINYINT         NULL,
    [AF_MaxByBookValue]        INT             NULL,
    [SalesPrice]               NUMERIC (9, 2)  NULL,
    [SellPriceRatio_Max]       TINYINT         NULL,
    [SellPrice_MaxByBookValue] INT             NULL,
    [LoanTerm]                 INT             NULL,
    [Term_Max]                 TINYINT         NOT NULL,
    [Lamp_Term]                VARCHAR (128)   NULL,
    [APR]                      NUMERIC (4, 2)  NULL,
    [APR_Min]                  TINYINT         NULL,
    [Lamp_APR]                 VARCHAR (128)   NULL,
    [Payment]                  NUMERIC (6, 2)  NULL,
    [ModelAge]                 INT             NULL,
    [BookValue]                INT             NULL,
    [MilesPerYear]             INT             NULL,
    [MileagePerYear_Max]       SMALLINT        NOT NULL,
    [Lamp_Miles]               VARCHAR (128)   NULL,
    [Miles_Max]                INT             NOT NULL,
    [Overage]                  NUMERIC (9, 2)  NULL,
    [Overage_AF]               NUMERIC (9, 2)  NULL,
    [Overage_SP]               NUMERIC (9, 2)  NULL,
    [OverageFee]               INT             NULL,
    [Fee]                      REAL            NULL,
    [Advance]                  TINYINT         NULL,
    [OverageFeeRatio]          TINYINT         NULL,
    [OverageAllowed]           SMALLINT        NULL,
    [FeeRate]                  TINYINT         NULL,
    [Fee_Max]                  SMALLINT        NOT NULL,
    [PTI_Max]                  TINYINT         NULL,
    [PTI]                      INT             NULL,
    [DTI_Max]                  TINYINT         NOT NULL,
    [DTI]                      INT             NULL,
    [OtherFeeName]             NVARCHAR (32)   NOT NULL,
    [OtherFeeValue]            NUMERIC (9, 2)  NULL,
    [TotalDeductFee]           NUMERIC (13, 2) NULL,
    [RecourseMonths]           TINYINT         NOT NULL,
    [AddMosRecourse]           TINYINT         NULL,
    [DeductFeeFromReserve]     BIT             NOT NULL,
    [CheckToDealer]            NUMERIC (9, 2)  NULL,
    [Reserve]                  NUMERIC (9, 2)  NULL,
    [GrossIncome]              NUMERIC (38)    NULL,
    [NonEmploymentIncome]      INT             NULL,
    [DebtNoCar]                INT             NULL,
    [HousePayment]             INT             NULL,
    [Installment]              INT             NULL,
    [Revolving]                INT             NULL,
    [JobTime_Min]              TINYINT         NOT NULL,
    [JobTimeCurrent]           INT             NULL,
    [ResidenceTime_Min]        TINYINT         NOT NULL,
    [AreaTime_Min]             TINYINT         NOT NULL,
    [MonthsCurrent]            INT             NULL,
    [MonthsInArea]             INT             NULL,
    [ModelAge_Max]             TINYINT         NOT NULL,
    [LoanTermOK]               INT             NULL,
    [APR_OK]                   NUMERIC (6, 2)  NULL,
    [MilesPerYearOK]           INT             NULL,
    [DTI_OK]                   INT             NULL,
    [PTI_OK]                   INT             NULL,
    [ModelAgeOK]               INT             NULL,
    [Lamp_DTI]                 VARCHAR (128)   NULL,
    [Lamp_PTI]                 VARCHAR (128)   NULL,
    [Lamp_ModelAge]            VARCHAR (128)   NULL,
    [Lamp_ResTime]             VARCHAR (128)   NULL,
    [Lamp_JobTime]             VARCHAR (128)   NULL,
    [ResidenceTimeOK]          INT             NULL,
    [JobTimeOK]                INT             NULL,
    [OpenUnitsAdjusted]        INT             NULL,
    [OpenUnitsOK]              INT             NULL,
    [Lamp_OpenUnits]           VARCHAR (128)   NULL,
    [StatusID]                 INT             NOT NULL
);

